import { $http } from './index';

interface CommonReq {
    [key: string]: string | number;
}

interface CommonRes {
    maxBidPoint: number;
    percent: string;
}

// 竞价方案计算最大竞得点位
export function calcMaxPoint(params: CommonReq): Promise<CommonRes> {
    return $http.post('/project/bid/calcMaxPoint', params);
}

// 执行竞价
export function executeBid(params: CommonReq[], projectId: string) {
    return $http.post(`/project/bid/${projectId}`, params);
}

